﻿@using Dentiste.Domain.Interfaces
@using Dentiste.UI.Models
@model PrintViewModel

@{
    Layout = null;
}

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
    <head>
        <title>Impression</title>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <link rel="stylesheet" type="text/css" href="/design/printer.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="/design/printer.css" media="print" />
    </head>

    <body>
        <div id="nom">
            @Model.FirstName @Model.LastName
        </div>
        <div id="grille">
            @foreach (IRow row in Model.Rows)
            {
                <div class="ligne">
                    <div class="date">
                        @row.Date.ToString("dd-MM-yyyy")
                    </div>
                    <div class="code">
                        @row.Inami.Code
                    </div>
                    <div class="dent">
                        @row.ToothNumber
                    </div>
                </div>
            }
        </div>
        @{
            double prixVipo = Model.Rows.Sum(row => row.Inami.Prix3);
        }
        <div id="prix">
            @(Model.PrintType == PrintType.Normal ? "OUI" : prixVipo+"€" )
        </div>
        <div id="cachet">
            St&eacute;phane de Qu&eacute;netain<br/>
            Dentiste<br/>
            3.06146.83.001<br/>
            T&eacute;l.: 04 89 11 80 85
        </div>
        <div id="dateCourante">
            @DateTime.Now.ToString("dd-MM-yyyy")
        </div>
    </body>
</html>